#define _CRT_SECURE_NO_WARNINGS 1
int removeElement(int* nums, int numsSize, int val) {
    int n = numsSize;
    int src = 0, dst = 0;
    while (src < n)
    {
        if (nums[src] != val)
        {
            nums[dst++] = nums[src++];
        }
        else
            src++;
    }
    return dst;
}